using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LASDataset
{
    /// <summary>
    /// <para>LAS Point Statistics As Raster</para>
    /// <para>Creates a raster whose cell values reflect statistical information about measurements from LAS files referenced by a LAS dataset.</para>
    /// <para>创建一个栅格，其像元值反映有关 LAS 数据集所引用的 LAS 文件中测量值的统计信息。</para>
    /// </summary>    
    [DisplayName("LAS Point Statistics As Raster")]
    public class LasPointStatsAsRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LasPointStatsAsRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster</para>
        /// <para><xdoc>
        ///   <para>The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file.</para>
        ///   <para>If the raster is stored as a TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格的位置和名称。将栅格数据集存储在地理数据库或 Esri Grid 等文件夹中时，请勿在栅格数据集的名称中添加文件扩展名。在将栅格存储在文件夹中时，可以提供文件扩展名来定义栅格的格式，例如.tif用于生成 GeoTIFF 或 .img 用于生成 ERDAS IMAGINE 格式文件。</para>
        ///   <para>如果栅格存储为 TIFF 文件或地理数据库中，则可以使用地理处理环境设置指定其栅格压缩类型和质量。</para>
        /// </xdoc></para>
        /// </param>
        public LasPointStatsAsRaster(object _in_las_dataset, object _out_raster)
        {
            this._in_las_dataset = _in_las_dataset;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "LAS Point Statistics As Raster";

        public override string CallName => "management.LasPointStatsAsRaster";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "configKeyword", "extent", "geographicTransformations", "outputCoordinateSystem", "pyramid", "rasterStatistics", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _out_raster, _method.GetGPValue(), _sampling_type.GetGPValue(), _sampling_value];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Output Raster</para>
        /// <para><xdoc>
        ///   <para>The location and name of the output raster. When storing a raster dataset in a geodatabase or in a folder such as an Esri Grid, do not add a file extension to the name of the raster dataset. A file extension can be provided to define the raster's format when storing it in a folder, such as .tif to generate a GeoTIFF or .img to generate an ERDAS IMAGINE format file.</para>
        ///   <para>If the raster is stored as a TIFF file or in a geodatabase, its raster compression type and quality can be specified using geoprocessing environment settings.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格的位置和名称。将栅格数据集存储在地理数据库或 Esri Grid 等文件夹中时，请勿在栅格数据集的名称中添加文件扩展名。在将栅格存储在文件夹中时，可以提供文件扩展名来定义栅格的格式，例如.tif用于生成 GeoTIFF 或 .img 用于生成 ERDAS IMAGINE 格式文件。</para>
        ///   <para>如果栅格存储为 TIFF 文件或地理数据库中，则可以使用地理处理环境设置指定其栅格压缩类型和质量。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>The type of statistics collected about the LAS points in each cell of the output raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Pulse Count—The number of last return points.</bullet_item><para/>
        ///     <bullet_item>Point Count—The number of points from all returns.</bullet_item><para/>
        ///     <bullet_item>Most Frequent Last Return—The most frequent last return value.</bullet_item><para/>
        ///     <bullet_item>Most Frequent Class Code—The most frequent class code.</bullet_item><para/>
        ///     <bullet_item>Range of Intensity Values—The range of intensity values.</bullet_item><para/>
        ///     <bullet_item>Range of Elevation Values—The range of elevation values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在输出栅格的每个像元中收集的有关 LAS 点的统计数据类型。</para>
        ///   <bulletList>
        ///     <bullet_item>脉冲计数 （Pulse Count） - 最后返回点的数量。</bullet_item><para/>
        ///     <bullet_item>点数 - 所有返回的点数。</bullet_item><para/>
        ///     <bullet_item>最频繁的上次返回 - 最频繁的最后返回值。</bullet_item><para/>
        ///     <bullet_item>最常用的类代码 - 最常用的类代码。</bullet_item><para/>
        ///     <bullet_item>强度值范围 - 强度值的范围。</bullet_item><para/>
        ///     <bullet_item>高程值范围 - 高程值范围。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._PULSE_COUNT;

        public enum _method_value
        {
            /// <summary>
            /// <para>Pulse Count</para>
            /// <para>Pulse Count—The number of last return points.</para>
            /// <para>脉冲计数 （Pulse Count） - 最后返回点的数量。</para>
            /// </summary>
            [Description("Pulse Count")]
            [GPEnumValue("PULSE_COUNT")]
            _PULSE_COUNT,

            /// <summary>
            /// <para>Point Count</para>
            /// <para>Point Count—The number of points from all returns.</para>
            /// <para>点数 - 所有返回的点数。</para>
            /// </summary>
            [Description("Point Count")]
            [GPEnumValue("POINT_COUNT")]
            _POINT_COUNT,

            /// <summary>
            /// <para>Most Frequent Last Return</para>
            /// <para>Most Frequent Last Return—The most frequent last return value.</para>
            /// <para>最频繁的上次返回 - 最频繁的最后返回值。</para>
            /// </summary>
            [Description("Most Frequent Last Return")]
            [GPEnumValue("PREDOMINANT_LAST_RETURN")]
            _PREDOMINANT_LAST_RETURN,

            /// <summary>
            /// <para>Most Frequent Class Code</para>
            /// <para>Most Frequent Class Code—The most frequent class code.</para>
            /// <para>最常用的类代码 - 最常用的类代码。</para>
            /// </summary>
            [Description("Most Frequent Class Code")]
            [GPEnumValue("PREDOMINANT_CLASS")]
            _PREDOMINANT_CLASS,

            /// <summary>
            /// <para>Range of Intensity Values</para>
            /// <para>Range of Intensity Values—The range of intensity values.</para>
            /// <para>强度值范围 - 强度值的范围。</para>
            /// </summary>
            [Description("Range of Intensity Values")]
            [GPEnumValue("INTENSITY_RANGE")]
            _INTENSITY_RANGE,

            /// <summary>
            /// <para>Range of Elevation Values</para>
            /// <para>Range of Elevation Values—The range of elevation values.</para>
            /// <para>高程值范围 - 高程值范围。</para>
            /// </summary>
            [Description("Range of Elevation Values")]
            [GPEnumValue("Z_RANGE")]
            _Z_RANGE,

        }

        /// <summary>
        /// <para>Sampling Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the method that will be used for interpreting the Sampling Value parameter value to define the resolution of the output raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Observations—The number of cells that divide the lengthiest side of the LAS dataset extent will be used.</bullet_item><para/>
        ///     <bullet_item>Cell Size—The cell size of the output raster will be used. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于解释采样值参数值以定义输出栅格分辨率的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>观测点—将使用划分 LAS 数据集最长边的像元数。</bullet_item><para/>
        ///     <bullet_item>像元大小—将使用输出栅格的像元大小。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sampling_type_value _sampling_type { get; set; } = _sampling_type_value._CELLSIZE;

        public enum _sampling_type_value
        {
            /// <summary>
            /// <para>Observations</para>
            /// <para>Observations—The number of cells that divide the lengthiest side of the LAS dataset extent will be used.</para>
            /// <para>观测点—将使用划分 LAS 数据集最长边的像元数。</para>
            /// </summary>
            [Description("Observations")]
            [GPEnumValue("OBSERVATIONS")]
            _OBSERVATIONS,

            /// <summary>
            /// <para>Cell Size</para>
            /// <para>Cell Size—The cell size of the output raster will be used. This is the default.</para>
            /// <para>像元大小—将使用输出栅格的像元大小。这是默认设置。</para>
            /// </summary>
            [Description("Cell Size")]
            [GPEnumValue("CELLSIZE")]
            _CELLSIZE,

        }

        /// <summary>
        /// <para>Sampling Value</para>
        /// <para>The value used in conjunction with the Sampling Type parameter to define the resolution of the output raster.</para>
        /// <para>与采样类型参数结合使用的值，用于定义输出栅格的分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _sampling_value { get; set; } = 10;


        public LasPointStatsAsRaster SetEnv(int? autoCommit = null, object cellSize = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object pyramid = null, object rasterStatistics = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, pyramid: pyramid, rasterStatistics: rasterStatistics, workspace: workspace);
            return this;
        }

    }

}